const path = require('path')

module.exports = {

  entry: './src/index.js',

  output: {
    path: path.resolve('lib'),
    publicPath: '/lib/',
    filename: 'index.js'
  },
  mode: 'production',
  module: {
    rules: [{
      test: /\.js/,
      use: {
        loader: 'babel-loader',
        options: {
          presets: ["@babel/preset-env","@babel/preset-react"]
        }
      },
      exclude: /node_modules/
    }, {
      test: /\.css$/,
      use: ['style-loader', 'css-loader']     
    }]
  }
}
